CUSTOM Windows API Java Wrap 1.08
Loading...
Searching...
No Matches
com.custom.wndapijwrap.CuCustomWndAPIJWrap Class Reference

Classes

enum  CcwLogVerbosity
 Verbosity level. More...
 
enum  OpenDeviceMode
 Open Communication Port Mode. More...
 

Public Member Functions

 CuCustomWndAPIJWrap () throws Exception
 Costructor. Use the default log verbosity level and Log folder path.
 
 CuCustomWndAPIJWrap (CcwLogVerbosity logVerbosity, String strLogFolderPath) throws Exception
 Costructor. Also specify log verbosity level and other settings.
 
void InitLibrary () throws Exception
 Initializes library. This must be the first call after the creation of the class.
 
void DeInitLibrary () throws Exception
 De-initialize library. Call this function as the last function before deinit the class.
 
String GetAPIVersion () throws Exception
 Returns current API version.
 
String GetAPIVersionHwLibrary () throws Exception
 Gets the API release for hardware library (C-library)
 
Object GetVariable (CuCustomWndDevice device, String var) throws Exception
 Get the value of an internal "parameter".
 
void SetVariable (Object device, String var, Object value) throws Exception
 Set the value of an internal "parameter".
 
void SetOpenDeviceMode (OpenDeviceMode ode) throws Exception
 Set the open mode for the devices.
 
OpenDeviceMode GetOpenDeviceMode () throws Exception
 Get the open mode for the devices.
 
void BinFileToPrintSpooler (String strPrinterName, String strFilePath, String strDocName) throws Exception
 Send a binary file into the printer spooler queue.
 
PrinterInfo[] EnumInstalledPrinters () throws Exception
 Enum the supported printers installed.
 
CuCustomWndDevice OpenInstalledPrinter (String strPrinterName) throws Exception
 Open the communication with a Installed printer.
 
USBDevice[] EnumUSBDevices () throws Exception
 Enum the usb devices connected.
 
CuCustomWndDevice OpenPrinterUSB (USBDevice udevice) throws Exception
 Open the communication with a USB printer.
 
ETHDevice[] EnumETHDevices (long dwSearchTimeout) throws Exception
 Enum the Ethernet/Wifi devices connected.
 
CuCustomWndDevice OpenPrinterETH (String strPrinterIPAddress) throws Exception
 Open the communication with a Ethernet / WIFI printer.
 
CuCustomWndDevice OpenPrinterETH (String strPrinterIPAddress, long dwPrinterIPPort) throws Exception
 Open the communication with a Ethernet / WIFI printer.
 
CuCustomWndDevice OpenPrinterETH (ETHDevice ethdevice) throws Exception
 
COMPort[] EnumCOMPorts () throws Exception
 Enum the COM Ports found.
 
CuCustomWndDevice OpenPrinterCOM (COMPort cport) throws Exception
 
CuCustomWndDevice OpenPrinterCOM (String strcport) throws Exception
 Open the communication with a COM port to printer.
 
PrinterStatus GetInstalledPrinterFullStatus (String strPrinterName) throws Exception
 Open the communication with a Installed printer.
 

Protected Member Functions

void finalize () throws Exception
 Destructor.
 

Detailed Description

Author
CUSTOM S.p.A.

Constructor & Destructor Documentation

◆ CuCustomWndAPIJWrap() [1/2]

com.custom.wndapijwrap.CuCustomWndAPIJWrap.CuCustomWndAPIJWrap ( ) throws Exception
inline

Costructor. Use the default log verbosity level and Log folder path.

◆ CuCustomWndAPIJWrap() [2/2]

com.custom.wndapijwrap.CuCustomWndAPIJWrap.CuCustomWndAPIJWrap ( CcwLogVerbosity  logVerbosity,
String  strLogFolderPath 
) throws Exception
inline

Costructor. Also specify log verbosity level and other settings.

Parameters
logVerbosityVerbosity log level.
strLogFolderPathLog folder path. If null or empty, the library uses the default path: "%Documents and settings%\CUSTOM\CuCustomWndAPI\Log".

Member Function Documentation

◆ BinFileToPrintSpooler()

void com.custom.wndapijwrap.CuCustomWndAPIJWrap.BinFileToPrintSpooler ( String  strPrinterName,
String  strFilePath,
String  strDocName 
) throws Exception
inline

Send a binary file into the printer spooler queue.

Parameters
strPrinterNameA string that is the installed printer name.
strFilePathA string with the file name to send to the printer spooler queue
strDocNameA string that is the document name (this value will be visible into the spooler queue)
Exceptions
CuCustomWndAPIJWrapException

◆ DeInitLibrary()

void com.custom.wndapijwrap.CuCustomWndAPIJWrap.DeInitLibrary ( ) throws Exception
inline

De-initialize library. Call this function as the last function before deinit the class.

Exceptions
CuCustomWndAPIJWrapException

◆ EnumCOMPorts()

COMPort[] com.custom.wndapijwrap.CuCustomWndAPIJWrap.EnumCOMPorts ( ) throws Exception
inline

Enum the COM Ports found.

Returns
the COMPort array of all the COM ports found.
Exceptions
CuCustomWndAPIJWrapException

◆ EnumETHDevices()

ETHDevice[] com.custom.wndapijwrap.CuCustomWndAPIJWrap.EnumETHDevices ( long  dwSearchTimeout) throws Exception
inline

Enum the Ethernet/Wifi devices connected.

Parameters
dwSearchTimeoutThe timeout to search the ethernet / wifi devices, minimum 300 (ms)
Returns
the ETHDevice array of all the Ethernet/Wifi devices found.
Exceptions
CuCustomWndAPIJWrapException

◆ EnumInstalledPrinters()

PrinterInfo[] com.custom.wndapijwrap.CuCustomWndAPIJWrap.EnumInstalledPrinters ( ) throws Exception
inline

Enum the supported printers installed.

Returns
the PrinterInfo array of all the supported printers installed.
Exceptions
CuCustomWndAPIJWrapException

◆ EnumUSBDevices()

USBDevice[] com.custom.wndapijwrap.CuCustomWndAPIJWrap.EnumUSBDevices ( ) throws Exception
inline

Enum the usb devices connected.

Returns
the USBDevice array of all the usb devices found.
Exceptions
CuCustomWndAPIJWrapException

◆ finalize()

void com.custom.wndapijwrap.CuCustomWndAPIJWrap.finalize ( ) throws Exception
inlineprotected

Destructor.

◆ GetAPIVersion()

String com.custom.wndapijwrap.CuCustomWndAPIJWrap.GetAPIVersion ( ) throws Exception
inline

Returns current API version.

Returns
A string containing the current API version
Exceptions
CuCustomWndAPIJWrapException

◆ GetAPIVersionHwLibrary()

String com.custom.wndapijwrap.CuCustomWndAPIJWrap.GetAPIVersionHwLibrary ( ) throws Exception
inline

Gets the API release for hardware library (C-library)

Returns
A String containing the hardware library (C-library) release
Exceptions
CuCustomWndAPIJWrapException

◆ GetInstalledPrinterFullStatus()

PrinterStatus com.custom.wndapijwrap.CuCustomWndAPIJWrap.GetInstalledPrinterFullStatus ( String  strPrinterName) throws Exception
inline

Open the communication with a Installed printer.

Parameters
strPrinterNameA string that is the installed printer name.
Returns
The CuCustomWndDevice device with the application will communicate to.
Exceptions
CuCustomWndAPIJWrapException

◆ GetOpenDeviceMode()

OpenDeviceMode com.custom.wndapijwrap.CuCustomWndAPIJWrap.GetOpenDeviceMode ( ) throws Exception
inline

Get the open mode for the devices.

Returns
dThe value of the different way to open the communication channels of the device.
Exceptions
CuCustomWndAPIJWrapException

◆ GetVariable()

Object com.custom.wndapijwrap.CuCustomWndAPIJWrap.GetVariable ( CuCustomWndDevice  device,
String  var 
) throws Exception
inline

Get the value of an internal "parameter".

Parameters
deviceThe CuCustomWndDevice device with the application will communicate to.
varA string that is the variable ID
Returns
Object with the value of the variable.
Exceptions
CuCustomWndAPIJWrapException

◆ InitLibrary()

void com.custom.wndapijwrap.CuCustomWndAPIJWrap.InitLibrary ( ) throws Exception
inline

Initializes library. This must be the first call after the creation of the class.

Exceptions
CuCustomWndAPIJWrapException

◆ OpenInstalledPrinter()

CuCustomWndDevice com.custom.wndapijwrap.CuCustomWndAPIJWrap.OpenInstalledPrinter ( String  strPrinterName) throws Exception
inline

Open the communication with a Installed printer.

Parameters
strPrinterNameA string that is the installed printer name.
Returns
The CuCustomWndDevice device with the application will communicate to.
Exceptions
CuCustomWndAPIJWrapException

◆ OpenPrinterCOM() [1/2]

CuCustomWndDevice com.custom.wndapijwrap.CuCustomWndAPIJWrap.OpenPrinterCOM ( COMPort  cport) throws Exception
inline

Open the communication with a COM port to printer

Parameters
cportA COMPort with all the parameters of the COM Port to open
Returns
The CuCustomWndDevice device with the application will communicate to.
Exceptions
CuCustomWndAPIJWrapException

◆ OpenPrinterCOM() [2/2]

CuCustomWndDevice com.custom.wndapijwrap.CuCustomWndAPIJWrap.OpenPrinterCOM ( String  strcport) throws Exception
inline

Open the communication with a COM port to printer.

Parameters
strcportthe string with the COM port to open.
Returns
The CuCustomWndDevice device with the application will communicate to.
Exceptions
CuCustomWndAPIJWrapException

◆ OpenPrinterETH() [1/3]

CuCustomWndDevice com.custom.wndapijwrap.CuCustomWndAPIJWrap.OpenPrinterETH ( ETHDevice  ethdevice) throws Exception
inline

Open the communication with a Ethernet / WIFI printer

Parameters
ethdeviceA ETHDevice with all the parameters of the Ethernet / WIFI printer to open.
Returns
The CuCustomWndDevice device with the application will communicate to.
Exceptions
CuCustomWndAPIJWrapException

◆ OpenPrinterETH() [2/3]

CuCustomWndDevice com.custom.wndapijwrap.CuCustomWndAPIJWrap.OpenPrinterETH ( String  strPrinterIPAddress) throws Exception
inline

Open the communication with a Ethernet / WIFI printer.

Parameters
strPrinterIPAddressthe string with the IP Address of the printer to open.
Returns
The CuCustomWndDevice device with the application will communicate to.
Exceptions
CuCustomWndAPIJWrapException

◆ OpenPrinterETH() [3/3]

CuCustomWndDevice com.custom.wndapijwrap.CuCustomWndAPIJWrap.OpenPrinterETH ( String  strPrinterIPAddress,
long  dwPrinterIPPort 
) throws Exception
inline

Open the communication with a Ethernet / WIFI printer.

Parameters
strPrinterIPAddressthe string with the IP Address of the printer to open.
dwPrinterIPPortthe network port to open int the printer. If this value is 0, it is automatically set to the default for the RAW print port (9100).
Returns
The CuCustomWndDevice device with the application will communicate to.
Exceptions
CuCustomWndAPIJWrapException

◆ OpenPrinterUSB()

CuCustomWndDevice com.custom.wndapijwrap.CuCustomWndAPIJWrap.OpenPrinterUSB ( USBDevice  udevice) throws Exception
inline

Open the communication with a USB printer.

Parameters
udeviceA USBDevice with all the parameters of the USB printer to open.
Returns
The CuCustomWndDevice device with the application will communicate to.
Exceptions
CuCustomWndAPIJWrapExceptionn

◆ SetOpenDeviceMode()

void com.custom.wndapijwrap.CuCustomWndAPIJWrap.SetOpenDeviceMode ( OpenDeviceMode  ode) throws Exception
inline

Set the open mode for the devices.

Parameters
odeThe different way to open the communication channels of the device.
Exceptions
CuCustomWndAPIJWrapException

◆ SetVariable()

void com.custom.wndapijwrap.CuCustomWndAPIJWrap.SetVariable ( Object  device,
String  var,
Object  value 
) throws Exception
inline

Set the value of an internal "parameter".

Parameters
deviceThe CuCustomWndDevice device with the application will communicate to.
varA string that is the variable ID
valueObject with the value to assign to the variable.
Exceptions
CuCustomWndAPIJWrapException